<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> 
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>

<html>
<head>
 <META http-equiv="Content-Type" content="text/html;charset=UTF-8"> 
</head>
 <style type="text/css">
   @import url(style.css);
 </style>
<body>
  <font color="green"><s:actionmessage/></font>
  <br /><br />
  <div class="content" align="center">
  <s:form action="search.action"  method="post">
      <display:table name="homes" class="userTable" cellpadding="5px"
                     sort="external" defaultsort="1" pagesize="10" id="element" 
                     requestURI="goListHomes.action"
                     decorator="es.uned.hoomgle.web.decorators.HomeTableDecorator">
                  		  		    
      <display:column property="id" title="ID" />
      <display:column property="area" title="Tamaño" />
      <display:column property="city.name" title="Ciudad" /> 
      <display:column property="city.state.name" title="Autonomía" />
      <display:column property="hasGarden" title="Jardin" />
      <display:column property="cost" title="Precio"/>      
      <display:column title="IR A DETALLE...">
       			<s:url var="url" id="detailUrl" action="homeDetail" escapeAmp="false" > 
                        <s:param name="id"><c:out value="${element.id}"/></s:param> 
                   </s:url>                                    
                    <sx:a href="%{detailUrl}"  targets="homes">Detalle</sx:a>                     
      </display:column> 
      </display:table>
	     <s:textfield label="" name="query" key="query" size="60"  labelSeparator="" ></s:textfield>
	     <s:submit type="button" label="Buscar en Hoomgle" method="execute" align="center" ></s:submit>
	     <s:actionerror/>
      </s:form> 
  </div>
</body>
</html>


